package com.koron.plan.web.feign;

import com.koron.bean.base.Response;
import com.koron.common.core.feignConfig.FeignFallbackFactory;
import com.koron.plan.web.feign.dto.EquipmentLocation;
import com.koron.plan.web.feign.dto.EquipmentParams;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author twcao
 * @title: EquipmentFeign
 * @projectName GDH_EAM_V2
 * @description: 设备远程过程调用
 * @date 2021/10/1116:20
 */
@FeignClient(value = "eam-service-device", fallbackFactory = FeignFallbackFactory.class)
public interface EquipmentFeign {

    @GetMapping("/equipment/getGenericParams")
    Response<Map<String, EquipmentParams>> queryById(@RequestParam("typeId") String typeId, @RequestParam("equipmentId") String equipmentId);

    @PostMapping("/equipment/getBatchBaseParams")
    Response<List<EquipmentParams>> getBatchBaseParams(@RequestBody List<String> equipmentIds);

    @PostMapping("/equipment/getTowerParams")
    Response<Map<String, Map<String, String>>> getTowerParams(@RequestBody List<String> equipmentIds);

    @PostMapping("/device/location/getByIdWithoutEquipment")
    Response<List<EquipmentLocation>> getByIdWithoutEquipment(@RequestBody List<String> id);
}